//
//  CreateWorks.swift
//  MyCookbook
//
//  Created by liaokylin on 2024/10/14.
//

import SwiftUI

struct CreateWorks: View {
    @Environment(\.dismiss) var dismiss
    var body: some View {
        NavigationStack{
            VStack{
                Image("5")
                    .frame(width: 80,height: 80)
                    .clipShape(/*@START_MENU_TOKEN@*/Circle()/*@END_MENU_TOKEN@*/)
                Spacer()
                HStack{
                    VStack{
                        Circle()
                            .fill(Color(hex: "#2bdcf5"))
                            .frame(width: 80)
                            .overlay{
                                Image(systemName: "list.clipboard").foregroundColor(.white).imageScale(.medium)
                            }
                        Text("传菜谱").font(.title3)
                    }.padding(.horizontal,10)
                    VStack{
                        Circle()
                            .fill(Color(hex: "#e90808"))
                            .frame(width: 80)
                            .overlay{
                                Image(systemName: "photo").foregroundColor(.white).imageScale(.medium)
                            }
                        Text("传作品").font(.title3)
                    }.padding(.horizontal,10)
                    VStack{
                        Circle()
                            .fill(Color(hex: "#bcf64c").opacity(0.6))
                            .frame(width: 80)
                            .overlay{
                                Image(systemName: "pencil.and.scribble").foregroundColor(.white).imageScale(.medium)
                            }
                        Text("记饮食").font(.title3)
                    }.padding(.horizontal,10)
                }.padding()
            }.toolbar{
                ToolbarItem(placement:.topBarLeading){
                    Image(systemName: "xmark")
                        .resizable()
                        .scaledToFit()
                        .frame(width: 12, height: 12)
                        .onTapGesture {
                            dismiss()
                        }
                }
            }
        }
    }
}

#Preview {
    CreateWorks()
}
